﻿
; TestController must be restarted before any changes in this file will be used.

; Manual is here: https://lygte-info.dk/project/TestControllerConfigDevice%20UK.html

#metadef
#idString HIOKI,DT4281,
#name Hioki DT4281
#handle DT4281

#metadef

#meta
#idString HIOKI,DT4282,
#name Hioki DT4282
#handle DT4282
#port comfixedbaud
; Alternate port types: comnobaud or com, com lets the user define baudrate on the "Load devices" page
#baudrate 19200
#driver SCPIx

; These definitions are used to strip the OK answer from the commands, making them into SCPI commands
#scpiCmd :SYST:FILTER txrx :SYST:FILTER (value)
#scpiCmd :SYST:LLO txrx :SYST:LLO (value)
#scpiCmd :SYST:GTL txrx :SYST:GTL (value)
#scpiCmd :SYST:SLOW txrx :SYST:SLOW (value)
#scpiCmd :SYST:CONDUCT txrx :SYST:CONDUCT (value)
#scpiCmd :SYST:DIODE txrx :SYST:DIODE (value)
#scpiCmd :SYST:DBM txrx :SYST:DBM (value)
#scpiCmd :SYST:APS txrx :SYST:APS (value)
#scpiCmd :SYST:LLO txrx :SYST:LLO (value)
#scpiCmd :SYST:GTL txrx :SYST:GTL (value)

; A list of possible column name with unit and formatter (SI, Time, Int, D0..D6) 
; Format: #value ColumnName Unit Format {Selector}
; Selector is only used when column layout varies with mode, this often require the use of #cmdMode
#value Voltage V SI DCV,ACV,ACDCV,SEPV,DIODE,
#value Current A SI DCuA,ACuA,DCmA,ACmA,DC_4_20mA,DCA,ACA
#value Resistance ohm SI RES,CONT
#value Decibel_m dBm _  dBm
#value Decibel_V dBV _ dBV
#value Siemens S SI nS
#value Temperature °C D1 TEMP
#value Capacitance F SI CAP

#cmdModeGet Set_mode mode?

; How to poll for data, this is used for table and #values?
; a #askMode, #cmdMode and #prepareSample is used before this is string is used.
; Number of returned values must match number of columns defined with #value
; This is a single line command
#askValues :FETCCNT?;:CONF?
#askValuesMathFormat hiokiValue(value);


; Format of answer: f=float, u=remove trailing letters, x=skip, *=Zero upper case values if this value is 0
;#askValuesReadFormat 

; Accept this delay when reading values (seconds)
#readingDelay 2

; Mode change have a longer delay on reading values (seconds)
#modeChangeDelay 10


; String to ask about actual meter mode, it is mostly used for DMM's
; This is a single line command
#askMode :conf?
#askModeMathFormat getMatchGroup(value,"^(.*),",1)


; When one of these commands are used through the command interface a new configuration will be done before using #askMode
; Only one word for each #mayModifyMode
; Specify command without initial colon and in the shortest possible form
;#mayModifyMode 


; Prepare the meter to response to #askValues
;#prepareSample arm:sour imm;:arm:count 1;:trig:sour imm;:trig:count 1;:trig:samp:count 1;init

; Initial commands to meter when establishing connection, used to disable local control
#initCmd :SYST:APS 0
; :SYST:LLO can be used to disable buttons on the dmm.

; Final command to meter before breaking connection, used to restore local control
#finalCmd :SYST:APS 1;:SYST:GTL

; Used to turn output off for power supplies, generators and electronic loads
;#outputOff 

#interfaceType DMM
#interface readValue 0


#cmdSetup radio Continuity
:write: :SYST:CONDUCT
:read: :STAT?
:readmath: substring(value,18,19);
:tip: This setting is remembered when power is turned off
20ohm 0
50ohm 1 
100ohm 2
500ohm 3

#cmdSetup radio Diode
:write: :SYST:DIODE
:read: :STAT?
:readmath: substring(value,19,20);
:tip: This setting is remembered when power is turned off
0.25V 0
0.5V 1
1.0V 2
1.5V 3
2.0V 4
2.5V 5
3.0V 6

#cmdSetup checkbox Slow
:write: :SYST:SLOW
:read: :STAT?
:readmath: substring(value,14,15);
on 0 1

#cmdSetup checkbox Filter
:write: :SYST:FILTER
:read: :STAT?
:readmath: substring(value,2,3);
:tip: Filter is only valid in AC modes.
on 0 1


#cmdSetup comboboxHot dBm_impedance
:write: :SYST:DBM
:read: :STAT?
:readmath: int(substring(value,20,22));
:tip: This setting is remembered when power is turned off
4ohm 0
8ohm 1
16ohm 2
32ohm 3
50ohm 4
75ohm 5
93ohm 6
110ohm 7
125ohm 8
135ohm 9
150ohm 10
200ohm 11 
250ohm 12
300ohm 13
500ohm 14
600ohm 15
800ohm 16
900ohm 17
1000ohm 18
1200ohm 19
